<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script th:fragment="contextPath" th:inline="javascript">
    let contextPath = '[(@{/})]';
    contextPath = contextPath.substring(0,contextPath.length-1);
</script>
</body>
</html>